package com.tedu.controller;

import javax.annotation.Resource;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.tedu.service.UserService;
import com.tedu.util.UserResult;

@Controller
public class LoginController {
	@Resource
	private UserService service;
	@RequestMapping("login.do")
	@ResponseBody
	public  UserResult login(HttpSession session,String name ,String password){
//		System.out.println(name+","+password);
		UserResult result=service.checkLogin(session,name, password);
		return result;
	}
}
